package com.demo.constant;


/**
 * 响应消息枚举类
 */
public enum Code {

    SUCCESS(200,"成功"),
    FAIL(500,"失败"),
    DELETE(200,"删除成功"),
    UN_DELETE(500,"删除失败"),
    INSERT(200,"添加成功"),
    UN_INSERT(500,"添加失败");


    /**
     * 响应状态码
     */
    private final int code;
    /**
     * 响应提示
     */
    private final String state;

    private Code(int code, String state) {
        this.code=code;
        this.state=state;
    }
    public String getState(){
        return this.state;
    }

    public int getCode() {
        return this.code;
    }
}
